package io.imp.modules.tasks.unionqrc.service;

import io.imp.commons.dynamic.datasource.annotation.DataSource;
import io.imp.modules.tasks.unionqrc.dao.ItcsStationInfoDao;
import io.imp.modules.tasks.unionqrc.entity.ItcsStationInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class ItcsStationInfoService {
    @Autowired
    private ItcsStationInfoDao itcsStationInfoDao;

    @DataSource("slave1")
    public String getSnameBySid(String stationId){
        return itcsStationInfoDao.getSnameBySid(stationId);
    }
    

    @DataSource("slave1")
    public List<ItcsStationInfo> getItcsStationInfoBySid(){
        return itcsStationInfoDao.getItcsStationInfoBySid();
    }
}
